package com.itheima.health.controller;

import com.itheima.health.common.R;
import com.itheima.health.common.yuyueShezhi;

import com.itheima.health.service.YuyueShezhiService;
import lombok.extern.slf4j.Slf4j;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;



@Slf4j
@RestController
@RequestMapping("/ordersetting")
public class YuyueShezhiController {
    @Autowired
    private YuyueShezhiService yuyueShezhiService;


    @RequestMapping("/getOrderSettingByMonth")
    public R<List<yuyueShezhi>> getOrderSettingByMonth(@RequestParam String month) {
        List<yuyueShezhi> list = yuyueShezhiService.getOrderSettingByMonth(month);
        return R.success(list);
    }


  /*  @PostMapping("/upload")
    public R shangchuan(@RequestParam(value = "excelFile") MultipartFile file) {
        try {
            yuyueShezhiService.importOrderSettings(file);
            return R.success("上传成功");
        } catch (Exception e) {
            return R.error("上传失败");
        }
    }*/
}